import plugin from '../../lib/plugins/plugin.js'
import fetch from "node-fetch"
import { segment } from "oicq";


export class example extends plugin {
  constructor () {
    super({
      /** 功能名称 */
      name: 'DJ表情插件',
      /** 功能描述 */
      dsc: '表情制作',

      event: 'message',
      /** 优先级，数字越小等级越高 */
      priority: 5000,
      rule: [
        


        {
          /** 命令正则匹配 */
          reg: '^纳西妲(.*)$',
          /** 执行方法 */
          fnc: 'olol'
        },
       {
          /** 命令正则匹配 */
          reg: '^首富(.*)$',
          /** 执行方法 */
          fnc: 'shoufu'
        }
      ]
    })
  }

  async olol (e){
 if (e.message[1].type == 'at') {let targetQQ = e.at;let url ='http://xiaobapi.top/api/xb/api/naxidabao.php?qq='+targetQQ;
await this.reply(segment.image(url),true)
      }}
async shoufu (e){
 if (e.message[1].type == 'at') {let targetQQ = e.at;let url ='http://xiaobapi.top/api/xb/api/stickers_certificate_5.php?qq='+targetQQ;
await this.reply(segment.image(url),true)
      }
  }}